package BESA.SystemLevel.transactions.agent;

import java.io.Serializable;

import BESA.Agent.Event.DataBESA;
import BESA.Agent.Event.EventBESA;

/**
 *
 * @author Andrea
 */
public class TransactionalEventBESA extends EventBESA implements Serializable {

    private static final long serialVersionUID = -6476779325063419645L;
    long idTransaction;

    public TransactionalEventBESA(String evType, DataBESA data, long idTransaction) {
        super(evType, data);
        this.idTransaction = idTransaction;
    }

    public TransactionalEventBESA(String evType, DataBESA data, byte priority, long idTransaction) {
        super(evType, data, priority);
        this.idTransaction = idTransaction;
    }

    public long getIdTransaction() {
        return idTransaction;
    }

    public EventBESA getNonTransactionalEventBESA() {
        return new EventBESA(this.getType(), this.getData(), this.getPriority());
    }
}
